/**
 * @name 菠菜
 * @date 2024-08-31 15:09
 */
public class Student {
    String name;
    public static int age;

    static String sex;
    static {
        sex = "男生";
        System.out.println("静态代码块被执行了");
    }
//    public Student(){
//        System.out.println("无参构造方法被执行了");
//    }
    public Student(String name, int age){
        System.out.println("有参构造方法被执行了");
        this.name = name;
        this.age = age;
    }
    public int getAge(){
        return age;
    }



}
